<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AWTK-CPP: TImageAnimation类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AWTK-CPP
   </div>
   <div id="projectbrief">AWTK CPP API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="class_t_image_animation-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">TImageAnimation类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="awtk__cpp_8hpp_source.html">awtk_cpp.hpp</a>&gt;</code></p>
<div class="dynheader">
类 TImageAnimation 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_t_image_animation.png" alt=""/>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:ad77f9ad94b0a652bc1f0b602342f3bc7"><td class="memItemLeft" align="right" valign="top"><a id="ad77f9ad94b0a652bc1f0b602342f3bc7"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TImageAnimation</b> (widget_t *nativeObj)</td></tr>
<tr class="separator:ad77f9ad94b0a652bc1f0b602342f3bc7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af5e77eebbf0e4eded236586beb2be47f"><td class="memItemLeft" align="right" valign="top"><a id="af5e77eebbf0e4eded236586beb2be47f"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TImageAnimation</b> (const image_animation_t *nativeObj)</td></tr>
<tr class="separator:af5e77eebbf0e4eded236586beb2be47f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab683a27badb3185be460ba295af51e1f"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_animation.html#ab683a27badb3185be460ba295af51e1f">SetLoop</a> (bool loop)</td></tr>
<tr class="separator:ab683a27badb3185be460ba295af51e1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4abbb0a70cf68e87e3ae7773f4fdad99"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_animation.html#a4abbb0a70cf68e87e3ae7773f4fdad99">SetImage</a> (const char *image)</td></tr>
<tr class="separator:a4abbb0a70cf68e87e3ae7773f4fdad99"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a744b0f9604ec97d31f2eac213fa836f0"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_animation.html#a744b0f9604ec97d31f2eac213fa836f0">SetInterval</a> (uint32_t interval)</td></tr>
<tr class="separator:a744b0f9604ec97d31f2eac213fa836f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe3841b1e7658c1191aab656aa78003e"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_animation.html#afe3841b1e7658c1191aab656aa78003e">SetDelay</a> (uint32_t delay)</td></tr>
<tr class="separator:afe3841b1e7658c1191aab656aa78003e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a38dbf2d7d2f8f3fba2e7385eec576fc6"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_animation.html#a38dbf2d7d2f8f3fba2e7385eec576fc6">SetAutoPlay</a> (bool auto_play)</td></tr>
<tr class="separator:a38dbf2d7d2f8f3fba2e7385eec576fc6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c7eca1451b8e302988c7964ec21e4f9"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_animation.html#a8c7eca1451b8e302988c7964ec21e4f9">SetSequence</a> (const char *sequence)</td></tr>
<tr class="separator:a8c7eca1451b8e302988c7964ec21e4f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad369a10f66201137cf8d3edc7118d04"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_animation.html#aad369a10f66201137cf8d3edc7118d04">SetRangeSequence</a> (uint32_t start_index, uint32_t end_index)</td></tr>
<tr class="separator:aad369a10f66201137cf8d3edc7118d04"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6b0730c8fdddecef4f0a3afd230990f6"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_animation.html#a6b0730c8fdddecef4f0a3afd230990f6">Play</a> ()</td></tr>
<tr class="separator:a6b0730c8fdddecef4f0a3afd230990f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a33869238b8cbab3503e89b5fad90a867"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_animation.html#a33869238b8cbab3503e89b5fad90a867">Stop</a> ()</td></tr>
<tr class="separator:a33869238b8cbab3503e89b5fad90a867"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99cc428d497e1d2c2944620516eef307"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_animation.html#a99cc428d497e1d2c2944620516eef307">Pause</a> ()</td></tr>
<tr class="separator:a99cc428d497e1d2c2944620516eef307"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af16320505439139b9f06080a383038f3"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_animation.html#af16320505439139b9f06080a383038f3">Next</a> ()</td></tr>
<tr class="separator:af16320505439139b9f06080a383038f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a148ee3919a54180112af2237031c1fce"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_animation.html#a148ee3919a54180112af2237031c1fce">SetFormat</a> (const char *format)</td></tr>
<tr class="separator:a148ee3919a54180112af2237031c1fce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac3e2e781ee6f917e377db5eb03d1f776"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_animation.html#ac3e2e781ee6f917e377db5eb03d1f776">SetUnloadAfterPaint</a> (bool unload_after_paint)</td></tr>
<tr class="separator:ac3e2e781ee6f917e377db5eb03d1f776"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f40e8d5049edc6d8b59ffdc546794b7"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_animation.html#a0f40e8d5049edc6d8b59ffdc546794b7">GetImage</a> () const</td></tr>
<tr class="separator:a0f40e8d5049edc6d8b59ffdc546794b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d3d5578b028af629c569b4f5366fcd1"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_animation.html#a4d3d5578b028af629c569b4f5366fcd1">GetSequence</a> () const</td></tr>
<tr class="separator:a4d3d5578b028af629c569b4f5366fcd1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a63ea0d14f12a1de2d850dd574eb64c8f"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_animation.html#a63ea0d14f12a1de2d850dd574eb64c8f">GetStartIndex</a> () const</td></tr>
<tr class="separator:a63ea0d14f12a1de2d850dd574eb64c8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45cf72af0fa208f42db5cbb185d9bb20"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_animation.html#a45cf72af0fa208f42db5cbb185d9bb20">GetEndIndex</a> () const</td></tr>
<tr class="separator:a45cf72af0fa208f42db5cbb185d9bb20"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a420183cf71d3b6d555ffcaa3d154349e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_animation.html#a420183cf71d3b6d555ffcaa3d154349e">GetLoop</a> () const</td></tr>
<tr class="separator:a420183cf71d3b6d555ffcaa3d154349e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e249c1ec66af776522394f4510ad3c8"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_animation.html#a0e249c1ec66af776522394f4510ad3c8">GetAutoPlay</a> () const</td></tr>
<tr class="separator:a0e249c1ec66af776522394f4510ad3c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3881eb32259e00f56e580331b4205dbd"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_animation.html#a3881eb32259e00f56e580331b4205dbd">GetUnloadAfterPaint</a> () const</td></tr>
<tr class="separator:a3881eb32259e00f56e580331b4205dbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5915403b9957a9c074cd2e6ae0ca75a3"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_animation.html#a5915403b9957a9c074cd2e6ae0ca75a3">GetFormat</a> () const</td></tr>
<tr class="separator:a5915403b9957a9c074cd2e6ae0ca75a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a997861111815fa3720526a50d447c274"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_animation.html#a997861111815fa3720526a50d447c274">GetInterval</a> () const</td></tr>
<tr class="separator:a997861111815fa3720526a50d447c274"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a314482ba75431c6320cd51904ad2f65f"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_animation.html#a314482ba75431c6320cd51904ad2f65f">GetDelay</a> () const</td></tr>
<tr class="separator:a314482ba75431c6320cd51904ad2f65f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a5f09e627f3935ffe57e20ebe279df048"><td class="memItemLeft" align="right" valign="top"><a id="a5f09e627f3935ffe57e20ebe279df048"></a>
static <a class="el" href="class_t_image_animation.html">TImageAnimation</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (widget_t *nativeObj)</td></tr>
<tr class="separator:a5f09e627f3935ffe57e20ebe279df048"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af87cb987d48a8608254d9de59748d725"><td class="memItemLeft" align="right" valign="top"><a id="af87cb987d48a8608254d9de59748d725"></a>
static <a class="el" href="class_t_image_animation.html">TImageAnimation</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (const widget_t *nativeObj)</td></tr>
<tr class="separator:af87cb987d48a8608254d9de59748d725"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac86c5115cf21ae3afc34e185d4557929"><td class="memItemLeft" align="right" valign="top"><a id="ac86c5115cf21ae3afc34e185d4557929"></a>
static <a class="el" href="class_t_image_animation.html">TImageAnimation</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (TWidget &amp;obj)</td></tr>
<tr class="separator:ac86c5115cf21ae3afc34e185d4557929"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8538573b98e158ac505b7ee4d3c40a7e"><td class="memItemLeft" align="right" valign="top"><a id="a8538573b98e158ac505b7ee4d3c40a7e"></a>
static <a class="el" href="class_t_image_animation.html">TImageAnimation</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (const TWidget &amp;obj)</td></tr>
<tr class="separator:a8538573b98e158ac505b7ee4d3c40a7e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a280c6af3d1fdb8a148f35492997a91d4"><td class="memItemLeft" align="right" valign="top">static TWidget&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_image_animation.html#a280c6af3d1fdb8a148f35492997a91d4">Create</a> (TWidget &amp;parent, xy_t x, xy_t y, wh_t w, wh_t h)</td></tr>
<tr class="separator:a280c6af3d1fdb8a148f35492997a91d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>图片动画控件，指定一个图片前缀，依次显示指定序列的图片，从而形成动画效果。</p>
<p>图片序列可以用sequence指定，也可以用start_index和end_index指定一个范围。</p>
<p>image_animation_t是widget\_t的子类控件，widget_t的函数均适用于image_animation_t控件。</p>
<p>在xml中使用"image\_animation"标签创建图片动画控件。如：</p>
<div class="fragment"><div class="line">*&lt;<span class="keywordtype">image_animation</span> <span class="keyword">image</span>=<span class="stringliteral">&quot;ani&quot;</span> <span class="keyword">start_index</span>=<span class="stringliteral">&quot;1&quot;</span> <span class="keyword">end_index</span>=<span class="stringliteral">&quot;9&quot;</span> <span class="keyword">auto_play</span>=<span class="stringliteral">&quot;true&quot;</span> <span class="keyword">interval</span>=<span class="stringliteral">&quot;50&quot;</span></div>
<div class="line">*<span class="keyword">delay</span>=<span class="stringliteral">&quot;100&quot;</span>/&gt;</div>
</div><!-- fragment --><blockquote class="doxtable">
<p>更多用法请参考： </p>
</blockquote>
<p><a href="https://github.com/zlgopen/awtk/blob/master/demos/assets/default/raw/ui/image_animation.xml">image_animation.xml</a></p>
<p>在c代码中使用函数image_animation_create创建图片动画控件。如：</p>
<blockquote class="doxtable">
<p>完整示例请参考： </p>
</blockquote>
<p><a href="https://github.com/zlgopen/awtk-c-demos/blob/master/demos/image_animation.c">image_animation demo</a></p>
<p>可用通过style来设置控件的显示风格，如背景颜色和边框等等，不过一般情况并不需要。 </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a280c6af3d1fdb8a148f35492997a91d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a280c6af3d1fdb8a148f35492997a91d4">&#9670;&nbsp;</a></span>Create()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TWidget TImageAnimation::Create </td>
          <td>(</td>
          <td class="paramtype">TWidget &amp;&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>创建image_animation对象</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent</td><td>父控件 </td></tr>
    <tr><td class="paramname">x</td><td>x坐标 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标 </td></tr>
    <tr><td class="paramname">w</td><td>宽度 </td></tr>
    <tr><td class="paramname">h</td><td>高度</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>对象。 </dd></dl>

</div>
</div>
<a id="a0e249c1ec66af776522394f4510ad3c8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0e249c1ec66af776522394f4510ad3c8">&#9670;&nbsp;</a></span>GetAutoPlay()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool TImageAnimation::GetAutoPlay </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>是否自动播放。 </p>

</div>
</div>
<a id="a314482ba75431c6320cd51904ad2f65f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a314482ba75431c6320cd51904ad2f65f">&#9670;&nbsp;</a></span>GetDelay()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t TImageAnimation::GetDelay </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>自动播放时延迟播放的时间(毫秒)。 </p>

</div>
</div>
<a id="a45cf72af0fa208f42db5cbb185d9bb20"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a45cf72af0fa208f42db5cbb185d9bb20">&#9670;&nbsp;</a></span>GetEndIndex()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t TImageAnimation::GetEndIndex </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>图片结束序数。 </p>

</div>
</div>
<a id="a5915403b9957a9c074cd2e6ae0ca75a3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5915403b9957a9c074cd2e6ae0ca75a3">&#9670;&nbsp;</a></span>GetFormat()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char * TImageAnimation::GetFormat </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>索引到图片名转换时的格式，缺省为"%s%d"。 </p>

</div>
</div>
<a id="a0f40e8d5049edc6d8b59ffdc546794b7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0f40e8d5049edc6d8b59ffdc546794b7">&#9670;&nbsp;</a></span>GetImage()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char * TImageAnimation::GetImage </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>图片名称的前缀。 </p>

</div>
</div>
<a id="a997861111815fa3720526a50d447c274"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a997861111815fa3720526a50d447c274">&#9670;&nbsp;</a></span>GetInterval()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t TImageAnimation::GetInterval </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>每张图片播放的时间(毫秒)。 </p>

</div>
</div>
<a id="a420183cf71d3b6d555ffcaa3d154349e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a420183cf71d3b6d555ffcaa3d154349e">&#9670;&nbsp;</a></span>GetLoop()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool TImageAnimation::GetLoop </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>是否循环播放。 </p>

</div>
</div>
<a id="a4d3d5578b028af629c569b4f5366fcd1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4d3d5578b028af629c569b4f5366fcd1">&#9670;&nbsp;</a></span>GetSequence()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char * TImageAnimation::GetSequence </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>播放的序列，字符可选值为数字和英文大小写字母，字符可以重复。如：0123456789或者123123abcd。 </p>

</div>
</div>
<a id="a63ea0d14f12a1de2d850dd574eb64c8f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a63ea0d14f12a1de2d850dd574eb64c8f">&#9670;&nbsp;</a></span>GetStartIndex()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t TImageAnimation::GetStartIndex </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>图片起始序数。 </p>

</div>
</div>
<a id="a3881eb32259e00f56e580331b4205dbd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3881eb32259e00f56e580331b4205dbd">&#9670;&nbsp;</a></span>GetUnloadAfterPaint()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool TImageAnimation::GetUnloadAfterPaint </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>绘制完成后unload图片，以释放内存空间。 </p>

</div>
</div>
<a id="af16320505439139b9f06080a383038f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af16320505439139b9f06080a383038f3">&#9670;&nbsp;</a></span>Next()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TImageAnimation::Next </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>手动切换到下一张图片。</p>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a99cc428d497e1d2c2944620516eef307"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a99cc428d497e1d2c2944620516eef307">&#9670;&nbsp;</a></span>Pause()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TImageAnimation::Pause </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>暂停。</p>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a6b0730c8fdddecef4f0a3afd230990f6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6b0730c8fdddecef4f0a3afd230990f6">&#9670;&nbsp;</a></span>Play()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TImageAnimation::Play </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>播放。</p>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a38dbf2d7d2f8f3fba2e7385eec576fc6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a38dbf2d7d2f8f3fba2e7385eec576fc6">&#9670;&nbsp;</a></span>SetAutoPlay()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TImageAnimation::SetAutoPlay </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>auto_play</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置是否自动播放。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">auto_play</td><td>是否自动播放。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="afe3841b1e7658c1191aab656aa78003e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afe3841b1e7658c1191aab656aa78003e">&#9670;&nbsp;</a></span>SetDelay()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TImageAnimation::SetDelay </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>delay</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置延迟播放时间(仅适用于自动播放)。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">delay</td><td>延迟播放时间(毫秒)。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a148ee3919a54180112af2237031c1fce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a148ee3919a54180112af2237031c1fce">&#9670;&nbsp;</a></span>SetFormat()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TImageAnimation::SetFormat </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>format</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置生成图片名的格式。</p>
<p>XXX:生成图片名时，第一个参数是图片名前缀，第二个是序数，只能在此前提下设置格式。</p>
<div class="fragment"><div class="line">*<span class="keyword">const</span> <span class="keywordtype">char</span>* format = image_animation-&gt;format ? image_animation-&gt;format : <span class="stringliteral">&quot;%s%d&quot;</span>;</div>
<div class="line">*tk_snprintf(name, TK_NAME_LEN, format, image_animation-&gt;image, image_animation-&gt;index);</div>
</div><!-- fragment --><dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">format</td><td>格式。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a4abbb0a70cf68e87e3ae7773f4fdad99"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4abbb0a70cf68e87e3ae7773f4fdad99">&#9670;&nbsp;</a></span>SetImage()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TImageAnimation::SetImage </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>image</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置图片前缀。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">image</td><td>图片前缀。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a744b0f9604ec97d31f2eac213fa836f0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a744b0f9604ec97d31f2eac213fa836f0">&#9670;&nbsp;</a></span>SetInterval()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TImageAnimation::SetInterval </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>interval</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置播放间隔时间。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">interval</td><td>间隔时间(毫秒)。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ab683a27badb3185be460ba295af51e1f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab683a27badb3185be460ba295af51e1f">&#9670;&nbsp;</a></span>SetLoop()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TImageAnimation::SetLoop </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>loop</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置是否循环播放。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">loop</td><td>是否循环播放。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="aad369a10f66201137cf8d3edc7118d04"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aad369a10f66201137cf8d3edc7118d04">&#9670;&nbsp;</a></span>SetRangeSequence()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TImageAnimation::SetRangeSequence </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>start_index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>end_index</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置播放序列。比如image为"fire"，start_index为0, end_index为99, 将依次播放"fire0", ..., "fire99"。</p>
<p>若指定的图片不存在，则重复上一张图片。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">start_index</td><td>图片起始序数。 </td></tr>
    <tr><td class="paramname">end_index</td><td>图片结束序数。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a8c7eca1451b8e302988c7964ec21e4f9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8c7eca1451b8e302988c7964ec21e4f9">&#9670;&nbsp;</a></span>SetSequence()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TImageAnimation::SetSequence </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>sequence</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置播放序列。比如image为"fire"，sequence为"12223", 将依次播放"fire1", "fire2", "fire2", "fire2", "fire3"。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">sequence</td><td>播放序列。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ac3e2e781ee6f917e377db5eb03d1f776"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac3e2e781ee6f917e377db5eb03d1f776">&#9670;&nbsp;</a></span>SetUnloadAfterPaint()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TImageAnimation::SetUnloadAfterPaint </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>unload_after_paint</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置绘制完成后unload图片，以释放内存空间。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">unload_after_paint</td><td>是否绘制完成后unload图片。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a33869238b8cbab3503e89b5fad90a867"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a33869238b8cbab3503e89b5fad90a867">&#9670;&nbsp;</a></span>Stop()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TImageAnimation::Stop </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>停止(并重置index为-1)。</p>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>output/<a class="el" href="awtk__cpp_8hpp_source.html">awtk_cpp.hpp</a></li>
<li>output/awtk_cpp.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
